package com.example.weight.navigation;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import com.example.weight.R;
import com.example.weight.greenSeasons.SolidLiquid.Gongyixianchang;
import com.example.weight.greenSeasons.compost.DuifeiFajiaowendu;
import com.example.weight.greenSeasons.compost.duifeigongyi;
import com.example.weight.greenSeasons.compost.duifeiyongdian;
import com.example.weight.greenSeasons.deodorization.ChuchouGongyixianchang;
import com.example.weight.greenSeasons.flocculation.xuninggongyi;
import com.example.weight.greenSeasons.others.FlyMouseCraft;
import com.example.weight.greenSeasons.waterDeal.WaterTreatmentTable;
import com.hjq.bar.OnTitleBarListener;
import com.hjq.bar.TitleBar;

public class GongyixianchangNeikongNavActivity extends AppCompatActivity {
    private TitleBar titleBar;
    private String name, role, factory;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gongyixianchang_neikong_nav);

        Intent previousIntent = getIntent();
        name = previousIntent.getStringExtra("name");
        role = previousIntent.getStringExtra("role");
        factory = previousIntent.getStringExtra("factory");
        Log.d("compostnavi", factory);


        titleBar=findViewById(R.id.titleBar);
        titleBar.setOnTitleBarListener(new OnTitleBarListener() {
            @Override
            public void onLeftClick(View v) {
                finish();
            }
            @Override
            public void onTitleClick(View v) {}
            @Override
            public void onRightClick(View v) {}
        });
    }

    public void turnGuyefenli(View view) {
        Intent intent =new Intent(GongyixianchangNeikongNavActivity.this, Gongyixianchang.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnXuning(View view) {
        Intent intent =new Intent(GongyixianchangNeikongNavActivity.this, xuninggongyi.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnDuifeiJinchuliao(View view) {
        Intent intent =new Intent(GongyixianchangNeikongNavActivity.this, duifeigongyi.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnDuifeiFajiaowendu(View view) {
        Intent intent =new Intent(GongyixianchangNeikongNavActivity.this, DuifeiFajiaowendu.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnShuichuli(View view) {
        Intent intent =new Intent(GongyixianchangNeikongNavActivity.this, WaterTreatmentTable.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnChuchou(View view) {
        Intent intent =new Intent(GongyixianchangNeikongNavActivity.this, ChuchouGongyixianchang.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }
    public void turnMieyingMieshu(View view) {
        Intent intent =new Intent(GongyixianchangNeikongNavActivity.this, FlyMouseCraft.class);
        intent.putExtra("name", name);
        intent.putExtra("factory", factory);
        startActivity(intent);
    }

}
